package com.ynu.springbootappdemo.dao;

import com.ynu.springbootappdemo.model.entity.Orders;
import com.ynu.springbootappdemo.model.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IOrderDao extends JpaRepository<Orders,Long> {
    Orders findAllByCustomerAndId(User customer, Long id);
    List<Orders> findAllByCustomer(User customer);
    //查询已支付未发货的订单
    List<Orders> findAllByOrderState(int orderState);
}
